/**
 * 
 */
package edu.sjtu.seda.experiment;

import edu.sjtu.seda.event.Event;
import edu.sjtu.seda.event.EventHandler;

/**
 * @author john.zhu
 *
 */
public class EventDrivenRunner {
	private Event event;
	private EventHandler[] handlers;
	
	public EventDrivenRunner(Event event,EventHandler...handlers){
		this.event = event;
		this.handlers = handlers;
	}
	
	public void run(){
		for(EventHandler handler : handlers){
			EventDrivenTest.log.info("event "+event.getUID()+" is running");
			handler.handle(event);
		}
	}

}
